<script type="text/javascript">
function bind() {
	var renren_bind = document.getElementById('renren_bind');
	renren_bind.submit();
}
</script>

			<!--{if empty($isbind)}-->
				<!--{if empty($_G['renren'])}-->
				<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=plugin&id=renren:spacecp" id="renren_bind" >
					<table cellspacing="0" cellpadding="0" class="tfm">
						<caption>
							<h2 class="wx">绑定人人帐号</h2>
							<p>如果你有人人帐号，可以与人人帐号绑定在一起。以后通过点击人人连接，就可以将有趣的事情告诉你人人网的好友。</p>
						</caption>
						<tr>
							<td>
								<div class="c">
									<input type="hidden" name="formhash" value="{FORMHASH}" />
									<input type="hidden" name="renren_bind" value="1" />
									<xn:login-button onlogin="bind();" ></xn:login-button>
								</div>
							</td>
						</tr>
					</table>
				</form>
				<!--{else}-->
				<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=plugin&id=renren:spacecp">
					<table cellspacing="0" cellpadding="0" class="tfm">
						<caption>
							<h2 class="wx">绑定本地帐号</h2>
							<p>如果你有网站帐号，可以与人人帐号绑定在一起。</p>
						</caption>
						<tr>
							<td>
							<div class="c">
								<input type="hidden" name="formhash" value="{FORMHASH}" />
								<input type="hidden" name="handlekey" value="lostpwform" />
								<div class="lgfm bm">
									<label><em>用户名:</em><input type="text" name="username" size="25" value=""  tabindex="1" class="txt" /></label>
									<label><em>密码:</em><input type="password" name="password" size="25" value=""  tabindex="1" class="txt" /></label>
								</div>
							</div>
							<p class="fsb cl">
								<em>&nbsp;</em>
								<input  type="submit" value=" 绑定 " name="discuz_bind"/>
							</p>
							</td>
						</tr>
					</table>
					<table cellspacing="0" cellpadding="0" class="tfm">
                    已经连接到本站的好友
					<xn:friendpile show-faces="connected" face-size="medium" max-rows="2" face-space="5" width="615"></xn:friendpile>
					<caption>
					<h2 class="wx">我人人网的头像</h2>
						<p>可以将人人网的头像同步到这里哟。头像同步后，您可能需要刷新一下本页面(按F5键)，才能查看最新的头像效果。</p>
					</caption>
					<tr>
                        <td>
                            <img src="$headurl" />
                         </td>
                    </tr>
                    </table>
					<input type="submit" value="同步头像" name="renren_avatar_submit"/>
				</form>
                
				<!--{/if}-->
     
			<!--{else}-->
 
				<form method="post" autocomplete="off" action="home.php?mod=spacecp&ac=plugin&id=renren:spacecp">
					<table cellspacing="0" cellpadding="0" class="tfm">
						<caption>
							<h2 class="wx">解除绑定</h2>
							<p>你可以在这里解除与人人帐号的绑定</p>
						</caption>
						<tr>
							<td>
								<div class="c">
								<h3>人人账户:{$rr_name}&nbsp;&nbsp;<img src="renren/image/connect_renren.png">&nbsp;&nbsp;论坛账户:{$dz_name}</h3>
								</div>
							</td>
						</tr>
						<tr>
							<td>
								<div class="c">
									<input type="hidden" name="formhash" value="{FORMHASH}" />
									<input type="submit" name="renren_unbind" value="解除绑定" />
								</div>
							</td>
						</tr>
					</table>
                    <table cellspacing="0" cellpadding="0" class="tfm">
                    <!--{if !empty($_G['renren'])}-->
                    已经连接到本站的好友
					<xn:friendpile show-faces="connected" face-size="medium" max-rows="2" face-space="5" width="615"></xn:friendpile>
					<caption>
					<h2 class="wx">我人人网的头像</h2>
						<p>可以将人人网的头像同步到这里哟。头像同步后，您可能需要刷新一下本页面(按F5键)，才能查看最新的头像效果。</p>
					</caption>
					<tr>
                        <td>
                            <img src="$headurl" />
                         </td>
                    </tr>
                    </table>
					<input type="submit" value="同步头像" name="renren_avatar_submit"/>
                 	<!--{else}-->
                    <h2 class="wx">你没有登录人人网所以无法同步和查看好友</h2>
                    <xn:login-button onlogin="location.reload()"></xn:login-button>
                    </table>
                    <!--{/if}-->
                    </form>
			<!--{/if}-->